{{ define "default/index.html" }}
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>首页</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="">
  <meta name="description" content="">
  <link rel="stylesheet" href="/static/layui/css/layui.css">
  <link rel="stylesheet" href="/static/css/global.css">
</head>
<body>
{{template "public/page_header.html" .}}

<div class="main layui-anim layui-anim-upbit layui-clear">
  <div class="layui-row layui-col-space15">
    <!-- left panel -->
    <div class="layui-col-md8">

      <!-- carousel -->
      <div class="layui-carousel fly-carousel" id="carousel">
        <div carousel-item>
          <div>条目1</div>
          <div>条目2</div>
          <div>条目3</div>
          <div>条目4</div>
          <div>条目5</div>
        </div>
      </div>
      
      <!-- list -->
      <ul class="fly-list">
		{{range $key,$value := .list}}
        <li class="fly-list-li">
          <a href="user.html" class="fly-list-avatar">
            <img src="/static/images/blog.jpg" alt="">
          </a>
          <h2 class="fly-tip">
            <a href="/content/{{$value.id}}">{{$value.title}}</a>
          </h2>
          <div class="fly-badge">
				{{if eq $value.hot "1"}}
				<span class="layui-badge layui-bg-black">精贴</span>
				{{end}}
				{{if eq $value.top "1"}}
				<span class="layui-badge layui-bg-red">置顶</span>
				{{end}}
          </div>
          <div class="fly-content-text">{{$value.title}}</div>
			<p class="layui-elip">
				{{if ne $value.catname ""}}
				<span><i class="layui-icon">&#xe612;</i> <a href="/cat/{{$value.cat}}"  class="layui-badge layui-bg-red" >{{$value.catname}}</a></span>
				{{end}}
				{{if ne $value.cat1name ""}}
				<span><i class="layui-icon">&#xe62d;</i> <a href="/cat/{{$value.cat1}}"  class="layui-badge layui-bg-red" >{{$value.cat1name}}</a></span>
				{{end}}
				{{if ne $value.cat2name ""}}
				<span><i class="layui-icon">&#xe857;</i> <a href="/cat/{{$value.cat2}}"  class="layui-badge layui-bg-red" >{{$value.cat2name}}</a></span>
				{{end}}
				<span class="fly-list-hint">
					<i class="layui-icon" title="人气">&#xe756;</i> {{$value.post_time}}
					<i class="iconfont" title="回答">&#xe60c;</i> {{$value.clicks}}
				</span>
			</p>
        </li>
        {{end}} 

      </ul>
      <!-- more -->
      <div style="text-align: center">
          <div class="laypage-main">
            <a href="javascript:void(0);" class="laypage-next">更多求解</a>
          </div>
        </div>

    </div>
    <!-- right panel -->
    <div class="layui-col-md4">

     
      
      <!-- tag -->
      <div class="fly-panel fly-list-one fly-tag">
        <h3 class="fly-panel-title">标签云</h3>
        <div class="fly-panel-content">
			{{range $key,$value := .cats}}
			<a href="/cat/{{$value.id}}" class="layui-badge layui-bg-orange">{{$value.cname}}</a>
			{{end}} 
        </div>
      </div>
      <!-- 最近综合 -->
      <dl class="fly-panel fly-list-one">
        <dt class="fly-panel-title">最近综合</dt>
			{{range $key,$value := .list1}}
			<dd>
				<a href="/content/{{$value.id}}">{{$value.title}}</a>
				<span><i class="layui-icon"></i>{{$value.post_time}}</span>
			</dd>
			{{end}}          
      </dl>
      <!-- 最近人气 -->
      <dl class="fly-panel fly-list-one">
        <dt class="fly-panel-title">最近人气</dt>
		{{range $key,$value := .list2}}
		<dd>
			<a href="/content/{{$value.id}}">{{$value.title}}</a>
			<span><i class="layui-icon"></i>{{$value.post_time}}</span>
		</dd>
		{{end}}         
      </dl>
      <!-- 最近热议 -->
       
      <!-- 友链 -->
      <div class="fly-panel fly-link">
        <h3 class="fly-panel-title">友情链接</h3>
        <dl>
          <dd>
            <a class="layui-btn layui-btn-small layui-btn-primary" href="http://www.layui.com/" target="_blank">layui</a>
          </dd>
          <dd>
            <a class="layui-btn layui-btn-small layui-btn-primary" href="http://layim.layui.com/" target="_blank">LayIM</a>
          </dd>
          <dd>
            <a class="layui-btn layui-btn-small layui-btn-primary" href="http://layer.layui.com/" target="_blank">layer</a>
          </dd>
        </dl>
      </div>

    </div>
  </div>
</div>
{{template "public/page_footer.html" .}}


{{end}}